<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      lang="zh-CN"
      xmlns:th="http://www.thymeleaf.org"
      xmlns="http://www.w3.org/1999/xhtml" layout:decorate="~{layout/template}">
<head>
    <title>内容审核</title>
    <link rel="stylesheet" href="/css/cms/content/list.css"/>
</head>
<body>
<div id="contentContainer" layout:fragment="content" class="contentContainer" v-cloak>

    <el-row>
        <el-table tooltip-effect="light"
                  class="dataTable"
                  border
                  :data="tableData"
                  :height="tableHeight">
            <el-table-column
                    prop="title"
                    label="标题">
                <template scope="scope">
                    <el-button type="text" @click="preview(scope.row.contentId)">
                        <span v-if="scope.row.topLevel>0" class="cms-ups">[置顶]</span>
                        {{scope.row.title}}
                    </el-button>
                </template>
            </el-table-column>
            <el-table-column
                    prop="channelName"
                    label="栏目"
                    align="center"
                    width="150">
            </el-table-column>
            <el-table-column
                    prop="userName"
                    label="发布者"
                    align="center"
                    width="140">
            </el-table-column>
            <el-table-column
                    prop="releaseDate"
                    label="发布时间"
                    align="center"
                    width="200">
            </el-table-column>
            <el-table-column label="操作"
                             align="center">
                <template slot-scope="scope">
                    <el-button th:if="${auditFunc!=null}"
                               size="mini"
                               type="success"
                               @click="onAudit(scope.$index, scope.row)">
                        <i th:class="${auditFunc.iconClass}"></i>
                        <span th:text="${auditFunc.name}"></span>
                    </el-button>
                    <el-button th:if="${withdrawFunc!=null}"
                               size="mini"
                               type="danger"
                               @click="onWithdraw(scope.$index, scope.row)">
                        <i th:class="${withdrawFunc.iconClass}"></i>
                        <span th:text="${withdrawFunc.name}"></span>
                    </el-button>
                    <el-button size="mini"
                               type="primary"
                               @click="showAuditSteps(scope.row.contentId)">
                        审核进度
                    </el-button>
                </template>
            </el-table-column>
        </el-table>
    </el-row>

    <el-row id="pagination">
        <div class="pull-right">
            <el-pagination
                    layout="total, sizes, prev, pager, next, jumper"
                    :current-page="pageNum"
                    :page-size="pageSize"
                    :page-sizes="pageSizes"
                    :total="total"
                    @size-change="onSizeChange"
                    @current-change="onCurrentChange">
            </el-pagination>
        </div>
    </el-row>

    <el-dialog title="撤回" :visible.sync="dialogFormVisible">
        <el-form :model="form" :rules="rules" ref="form" label-width="80px">
            <el-form-item label="撤回原因" prop="withdrawReason">
                <el-input type="textarea"
                          :rows="5"
                          placeholder="请输入撤回原因"
                          v-model="form.withdrawReason"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer">
            <el-button @click="dialogFormVisible = false">取 消</el-button>
            <el-button type="primary" @click="submitForm('form')">确 定</el-button>
        </div>
    </el-dialog>
</div>

<th:block layout:fragment="staticFile">
    <script src="/js/cms/content/auditList.js"></script>
</th:block>

</body>
</html>